import Main from '@/components/main'
import parentView from '@/components/parent-view'

export default [
  {
    path: '/login',
    name: 'login',
    meta: {
      title: 'Login - 登录',
      hideInMenu: true
    },
    component: () => import('@/view/login/login.vue')
  },
  {
    path: '/',
    name: '_home',
    redirect: '/home',
    component: Main,
    meta: {
      hideInMenu: true,
      notCache: true
    },
    children: [
      {
        path: '/home',
        name: 'home',
        meta: {
          hideInMenu: true,
          title: '首页',
          notCache: true,
          icon: 'md-home'
        },
        component: () => import('@/view/single-page/home')
      }
    ]
  },
  {
    path: '/contribue',
    name: 'contribue',
    meta: {
      icon: 'logo-buffer',
      title: '在线投稿'
    },
    component: Main,
    children: [
      {
        path: 'send-contribute',
        name: 'send-contribute',
        meta: {
          icon: 'md-arrow-dropdown-circle',
          title: '我要投稿'
        },
        component: () => import('@/view/components/send-contribute/index.vue')
      },
      {
        path: 'update-contribute',
        name: 'update-contribute',
        meta: {
          icon: 'md-trending-up',
          title: '返修稿件'
        },
        component: () => import('@/view/components/update-contribute/index.vue')
      },
      {
        path: 'contribute-list',
        name: 'contribute-list',
        meta: {
          icon: 'md-list',
          title: '已投稿件'
        },
        component: () => import('@/view/components/contribute-list/index.vue')
      }
    ]
  },
  {
    path: '/messages',
    name: 'messages',
    meta: {
      icon: 'md-alarm',
      title: '消息中心'
    },
    component: Main,
    children: [
      {
        path: 'send-message',
        name: 'send-message',
        meta: {
          icon: 'md-arrow-dropdown-circle',
          title: '发送消息'
        },
        component: () => import('@/view/components/send-message/index.vue')
      },
      {
        path: 'message-list',
        name: 'message-list',
        meta: {
          icon: 'md-trending-up',
          title: '已接收消息'
        },
        component: () => import('@/view/components/message-list/index.vue')
      }
    ]
  },
  {
    path: '/editor',
    name: 'editor',
    meta: {
      icon: 'md-checkbox-outline',
      title: '编辑部信息'
    },
    component: Main,
    children: [
      {
        path: 'tree_select_page',
        name: 'tree_select_page',
        meta: {
          icon: 'md-arrow-dropdown-circle',
          title: '添加审稿专家'
        },
        // component: () => import('@/view/components/tree-select/index.vue')
      },
      {
        path: 'count_to_page',
        name: 'count_to_page',
        meta: {
          icon: 'md-trending-up',
          title: '期刊简介'
        },
        // component: () => import('@/view/components/count-to/count-to.vue')
      },
      {
        path: 'count_to_page_1',
        name: 'count_to_page_1',
        meta: {
          icon: 'md-trending-up',
          title: '编辑部简介'
        },
        // component: () => import('@/view/components/count-to/count-to.vue')
      }
    ]
  },
  {
    path: '/components',
    name: 'personal',
    meta: {
      icon: 'md-person',
      title: '个人信息'
    },
    component: Main,
    children: [
      {
        path: 'personal_info',
        name: 'personal_info',
        meta: {
          icon: 'md-contact',
          title: '个人资料'
        },
        component: () => import('@/view/components/personal-info/index.vue')
      },
      {
        path: 'update_password',
        name: 'update_password',
        meta: {
          icon: 'ios-contact',
          title: '修改密码'
        },
        component: () => import('@/view/components/update-password/index.vue')
      }
    ]
  },
  {
    path: '/error_logger',
    name: 'error_logger',
    meta: {
      hideInBread: true,
      hideInMenu: true
    },
    component: Main,
    children: [
      {
        path: 'error_logger_page',
        name: 'error_logger_page',
        meta: {
          icon: 'ios-bug',
          title: '错误收集'
        },
        component: () => import('@/view/single-page/error-logger.vue')
      }
    ]
  },
  {
    path: '/argu',
    name: 'argu',
    meta: {
      hideInMenu: true
    },
    component: Main,
    children: [
      {
        path: 'params/:id',
        name: 'params',
        meta: {
          icon: 'md-flower',
          title: route => `{{ params }}-${route.params.id}`,
          notCache: true,
          beforeCloseName: 'before_close_normal'
        },
        component: () => import('@/view/argu-page/params.vue')
      },
      {
        path: 'query',
        name: 'query',
        meta: {
          icon: 'md-flower',
          title: route => `{{ query }}-${route.query.id}`,
          notCache: true
        },
        component: () => import('@/view/argu-page/query.vue')
      }
    ]
  },
  {
    path: '/401',
    name: 'error_401',
    meta: {
      hideInMenu: true
    },
    component: () => import('@/view/error-page/401.vue')
  },
  {
    path: '/500',
    name: 'error_500',
    meta: {
      hideInMenu: true
    },
    component: () => import('@/view/error-page/500.vue')
  },
  {
    path: '*',
    name: 'error_404',
    meta: {
      hideInMenu: true
    },
    component: () => import('@/view/error-page/404.vue')
  }
]
